package com.itheima.d4_abstract_template_method.example;

public abstract class People {
    private String name;
    private int age;

    public People() {
    }

    public People(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public final void showInfo() {
        System.out.println("开始介绍：");
        System.out.println("我是"+name+"今年"+age+"岁");
        work();
        System.out.println("很高兴和大家见面");
    }

    public abstract void work();
}
